int bintime = be_read32(data + i + 8) & 0x7FFFFFFF;
int bindate = be_read32(data + i + 12);
QDateTime creation_time = bintime2utc(bindate, bintime);
- QString datetime = creation_time.toString("yyyy/MM/dd hh:mm:ss");
+ QString datetime = creation_time.toString(u"yyyy/MM/dd hh:mm:ss");
*track = new route_head;
(*track)->rte_name = QStringLiteral("%1 tracklog (%2)").arg(model->name, datetime);
(*track)->rte_desc = "GPS tracklog data";
QString
ExifFormat::exif_time_str(const QDateTime& time)
{
- QString str = time.toString("yyyy/MM/dd hh:mm:ss t");
+ QString str = time.toString(u"yyyy/MM/dd hh:mm:ss t");
if (time.timeSpec() != Qt::UTC) {
str.append(" (");
- str.append(time.toUTC().toString("yyyy/MM/dd hh:mm:ss t"));
+ str.append(time.toUTC().toString(u"yyyy/MM/dd hh:mm:ss t"));
str.append(")");
}
return str;
exif_put_double(GPS_IFD, GPS_IFD_TAG_TIMESTAMP, 1, dt.time().minute());
exif_put_double(GPS_IFD, GPS_IFD_TAG_TIMESTAMP, 2, dt.time().second());
- exif_put_str(GPS_IFD, GPS_IFD_TAG_DATESTAMP, CSTR(dt.toString("yyyy:MM:dd")));
+ exif_put_str(GPS_IFD, GPS_IFD_TAG_DATESTAMP, CSTR(dt.toString(u"yyyy:MM:dd")));
} else {
exif_remove_tag(GPS_IFD, GPS_IFD_TAG_TIMESTAMP);
exif_remove_tag(GPS_IFD, GPS_IFD_TAG_DATESTAMP);
if (wpt->creation_time.isValid()) {
char tbuf[20];
- QByteArray dmy = wpt->GetCreationTime().toUTC().toString("ddMMyy").toUtf8();
- QByteArray hms = wpt->GetCreationTime().toUTC().toString("hhmmss").toUtf8();
+ QByteArray dmy = wpt->GetCreationTime().toUTC().toString(u"ddMMyy").toUtf8();
+ QByteArray hms = wpt->GetCreationTime().toUTC().toString(u"hhmmss").toUtf8();
snprintf(tbuf, sizeof(tbuf), ",%s,%s",dmy.constData(), hms.constData());
strcat(obuf, tbuf);
kml_output_timestamp(waypointp);
QString date_placed;
if (waypointp->GetCreationTime().isValid()) {
- date_placed = waypointp->GetCreationTime().toString("dd-MMM-yyyy");
+ date_placed = waypointp->GetCreationTime().toString(u"dd-MMM-yyyy");
}
writer->writeTextElement(QStringLiteral("styleUrl"), QStringLiteral("#geocache"));
if (global_opts.debug_level > 2) {
if (global_opts.debug_level == 99) {
- printf(" '%s'", qPrintable(wpt_tmp->GetCreationTime().toString("yyyy/MM/dd hh:mm:ss")));
+ printf(" '%s'", qPrintable(wpt_tmp->GetCreationTime().toString(u"yyyy/MM/dd hh:mm:ss")));
} else {
printf(MYNAME " parse_waypt: creation time '%s', waypt_time %" PRId64 "\n",
- qPrintable(wpt_tmp->GetCreationTime().toString("yyyy/MM/dd hh:mm:ss")), waypt_time);
+ qPrintable(wpt_tmp->GetCreationTime().toString(u"yyyy/MM/dd hh:mm:ss")), waypt_time);
}
}
} else {
printf(" %6s %16s", QByteArray::number(desc.length()).constData(), qPrintable(desc));
}
- printf(" '%s'", qPrintable(wpt_tmp->GetCreationTime().toString("yyyy/MM/dd hh:mm:ss")));
+ printf(" '%s'", qPrintable(wpt_tmp->GetCreationTime().toString(u"yyyy/MM/dd hh:mm:ss")));
printf(" %08x %8.3f %08x %08x %08x\n",
unused_byte, fsdata->depth, loran_GRI, loran_Tda, loran_Tdb);
} else {
int create_time = gbfgetint32(file_in);
if (global_opts.debug_level == 99) {
QDateTime qdt = lowranceusr4_get_timestamp(create_date, create_time);
- printf(MYNAME " parse_trails: creation date/time = %s\n", qPrintable(qdt.toString("yyyy-MM-dd hh:mm:ss AP")));
+ printf(MYNAME " parse_trails: creation date/time = %s\n", qPrintable(qdt.toString(u"yyyy-MM-dd hh:mm:ss AP")));
}
/* Some flag bytes */
if (global_opts.debug_level >= 2) {
if (global_opts.debug_level == 99) {
printf(MYNAME " parse_trails: %+14.9f %+14.9f", wpt_tmp->longitude, wpt_tmp->latitude);
- printf(" '%s'", qPrintable(wpt_tmp->GetCreationTime().toString("yyyy/MM/dd hh:mm:ss")));
+ printf(" '%s'", qPrintable(wpt_tmp->GetCreationTime().toString(u"yyyy/MM/dd hh:mm:ss")));
} else {
printf(MYNAME " parse_trails: added trailpoint %+.9f,%+.9f to trail %s\n",
wpt_tmp->longitude, wpt_tmp->latitude, qPrintable(trk_head->rte_name));
int create_time = gbfgetint32(file_in);
if (global_opts.debug_level >= 1) {
QDateTime qdt = lowranceusr4_get_timestamp(create_date, create_time);
- printf(MYNAME " creation date/time : '%s'\n", qPrintable(qdt.toString("yyyy-MM-dd hh:mm:ss AP")));
+ printf(MYNAME " creation date/time : '%s'\n", qPrintable(qdt.toString(u"yyyy-MM-dd hh:mm:ss AP")));
}
unsigned char byte = gbfgetc(file_in); /* unused, apparently */
/* Lowrance needs it as seconds since Jan 1, 2000 */
waypt_time -= base_time_secs;
if (global_opts.debug_level >= 2) {
- printf("creation_time %" PRId64 ", '%s'", waypt_time, qPrintable(wpt->GetCreationTime().toString("yyyy-MM-dd hh:mm:ss")));
+ printf("creation_time %" PRId64 ", '%s'", waypt_time, qPrintable(wpt->GetCreationTime().toString(u"yyyy-MM-dd hh:mm:ss")));
}
} else {
/* If false, make sure it is an unknown time value */
/* date string */
gpsbabel::DateTime now = current_time().toUTC();
- lowranceusr4_writestr(now.toString("MM/dd/yyyy"), file_out, 1);
+ lowranceusr4_writestr(now.toString(u"MM/dd/yyyy"), file_out, 1);
/* creation date/time */
auto ts = lowranceusr4_jd_from_timestamp(now);
QDateTime dt = waypointp->GetCreationTime().toUTC();
dt = dt.addMSecs(10 * lround(dt.time().msec()/10.0) - dt.time().msec());
assert((dt.time().msec() % 10) == 0);
- dmy = dt.toString("ddMMyy").toUtf8();
- hms = dt.toString("hhmmss.zzz").left(9).toUtf8();
+ dmy = dt.toString(u"ddMMyy").toUtf8();
+ hms = dt.toString(u"hhmmss.zzz").left(9).toUtf8();
}
double lon = fabs(ilon);
QByteArray dmy("");
QByteArray hms("");
if (wpt->GetCreationTime().isValid()) {
- dmy = wpt->GetCreationTime().toUTC().toString("ddMMyy").toUtf8();
- hms = wpt->GetCreationTime().toUTC().toString("hhmmss.zzz").toUtf8();
+ dmy = wpt->GetCreationTime().toUTC().toString(u"ddMMyy").toUtf8();
+ hms = wpt->GetCreationTime().toUTC().toString(u"hhmmss.zzz").toUtf8();
}
switch (wpt->fix) {
qDebug().noquote() << "GPS track start is "
<< waypointp->GetCreationTime().toUTC().toString(Qt::ISODateWithMs);
qDebug().noquote() << "Synchronizing"
- << video_time(gps_datetime).toString("HH:mm:ss,zzz")
+ << video_time(gps_datetime).toString(u"HH:mm:ss,zzz")
<< "to" << gps_datetime.toString(Qt::ISODateWithMs);
qDebug().noquote() << "Video start 00:00:00,000 is"
<< video_datetime.toString(Qt::ISODateWithMs);
QString datetimestring;
if (opt_interval != 0) {
- datetimestring = dt.toUTC().toString("yyyyMMddhhmmss");
+ datetimestring = dt.toUTC().toString(u"yyyyMMddhhmmss");
} else {
- datetimestring = dt.toUTC().toString("yyyyMMdd");
+ datetimestring = dt.toUTC().toString(u"yyyyMMdd");
}
if ((opt_title != nullptr) && (strlen(opt_title) > 0)) {
dt = dt.toUTC();
}
- unicsv_print_str(dt.toString("yyyy/MM/dd hh:mm:ss"));
+ unicsv_print_str(dt.toString(u"yyyy/MM/dd hh:mm:ss"));
}
#define FIELD_USED(a) (gb_getbit(&unicsv_outp_flags, a))
} else {
dt = wpt->GetCreationTime().toLocalTime();
}
- QString date = dt.toString("yyyy/MM/dd");
+ QString date = dt.toString(u"yyyy/MM/dd");
*fout << unicsv_fieldsep << date;
} else {
*fout << unicsv_fieldsep;
}
QString out;
if (t.msec() > 0) {
- out = t.toString("hh:mm:ss.zzz");
+ out = t.toString(u"hh:mm:ss.zzz");
} else {
- out = t.toString("hh:mm:ss");
+ out = t.toString(u"hh:mm:ss");
}
*fout << unicsv_fieldsep << out;
} else {
QDateTime dt = current_time().toUTC();
- QString dts = dt.toString("ddd MMM dd hh:mm:ss yyyy");
+ QString dts = dt.toString(u"ddd MMM dd hh:mm:ss yyyy");
replacement.replace("__DATE_AND_TIME__", dts);
- QString d = dt.toString("MM/dd/yyyy");
+ QString d = dt.toString(u"MM/dd/yyyy");
replacement.replace("__DATE__", d);
- QString t = dt.toString("hh:mm:ss");
+ QString t = dt.toString(u"hh:mm:ss");
replacement.replace("__TIME__", t);
}
return replacement;